
/* -----------------
* brief 
* 1. this is code gen by tools 
* 2. array like [a,b,c] after each field, define the ui html tag in view, 
		a for title, 
		b for show or not , (onlyread is trial feature)
		c for element html tag , currently support : check、radio、select、input、textarea、upload
* 3. XXX
*/
//go:generate legogen -type=OrderDetail -kv=ModuleName=orders,PrjName=saas_sys_base -dirconf=../../.. ./OrderDetail.go

/*使用方法一(go generate)：在工程root目录下，执行go generate ./modules/orders/models

使用方法二(legogen)：直接调用生成命令
legogen -type=OrderDetail -kv=ModuleName=merchantCard,PrjName=saas_sys_base -dirconf=./. ./modules/orders/models/OrderDetail.go
*/

package orders
import (
	"github.com/mjiulee/lego"
)

func init() {
	lego.AddBeanToSynList(new(OrderDetail))
}

/* table: "tb_order_detail"
 * -----------------
*/
type OrderDetail struct {
	Id        int64  `xorm:"pk" json:",string"`                  // ["id","hide","hidden"]
	IfDel     int `xorm:"default 0"` // ["deleted","hide","hidden"]
	Cdate     string `xorm:"DateTime created"`    // ["create","show","datetime"]
	Udate     string `xorm:"DateTime updated"`    // ["update","show","datetime"]
    // add your custom field here

    OrderId int64 `xorm:"BigInt" json:",string"` // ["OrderId","show","input"]

    ProductId int64 `xorm:"BigInt" json:",string"` // ["ProductId","show","input"]

    SpecId int64 `xorm:"BigInt" json:",string"` // ["SpecId","show","input"]

	ProductName string `xorm:"varchar(255)  "` // ["商品名称","show","input"]

	SpecName string `xorm:"varchar(255)  "` // ["规格名称","show","input"]

	SellPrice int64 `xorm:"BigInt  "` // ["售价","show","input"]

	ItemNo string `xorm:"varchar(255)  "` // ["货号","show","input"]

	BarCode string `xorm:"varchar(255)  "` // ["规格名称","show","input"]

	Num int `xorm:"default 0"` // ["Num","show","input"]

	DefaultImage string `xorm:"varchar(255)  "` // ["商品图片","show","input"]

}